import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Rank from '../views/Rank.vue'
import PlayListDetail from '../components/playListDetail/PlayListDetail.vue'
import RankListDetail from '../components/rank/RankListDetail.vue'
import SongDetail from '../components/rank/SongDetail.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta: {
      showTab: true
    }
  },
  {
    path: '/rank',
    name: 'Rank',
    component: Rank,
    meta: {
      showTab: true
    }
  },
  {
    path: '/playListDetail/:id',
    name: 'PlayListDetail',
    component: PlayListDetail,
    meta: {
      showTab: false
    }
  },
  {
    path: '/RankListDetail/:id',
    name: 'RankListDetail',
    component: RankListDetail,
    meta: {
      showTab: false
    }
  },
  {
    path: '/SongDetail/:id',
    name: 'SongDetail',
    component: SongDetail,
    meta: {
      showTab: false
    }
  }

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
